# -*-coding=utf-8 -*-
from sklearn import svm

# 定义三个输入变量
X = [[2,0],[1,1],[2,3]]
# 分类标记
y = [0,0,1]
# 训练模型
clf = svm.SVC(kernel='linear') # 核函数
clf.fit(X, y)

print clf

# get support vectors
print clf.support_vectors_

# get indices of support vectors
print clf.support_

# get number of support vectors for each class 
print clf.n_support_

print clf.predict([2,0])